<template>
	<view style="background-color: #F7F7F7;">
		<!-- tabs点击栏 -->
		<view class="tabsBarHeader">
			<view
				@click="handleTabsBarClick('1')"
				style="width:15%"
				class="barHeaderItem"
				:class="projectFinnaceCurrent == '1' ? 'tabsCurrentHeader' : ''"
			>
				概览
			</view>
			<view
				@click="handleTabsBarClick('2')"
				style="width:15%"
				class="barHeaderItem"
				:class="projectFinnaceCurrent == '2' ? 'tabsCurrentHeader' : ''"
			>
				报销
			</view>
			<view
				@click="handleTabsBarClick('3')"
				style="width:23%"
				class="barHeaderItem"
				:class="projectFinnaceCurrent == '3' ? 'tabsCurrentHeader' : ''"
			>
				项目结算
			</view>
			<view
				@click="handleTabsBarClick('4')"
				style="width:24%"
				class="barHeaderItem"
				:class="projectFinnaceCurrent == '4' ? 'tabsCurrentHeader' : ''"
			>
				项目专家费
			</view>
			<view
				@click="handleTabsBarClick('5')"
				style="width:23%"
				class="barHeaderItem"
				:class="projectFinnaceCurrent == '5' ? 'tabsCurrentHeader' : ''"
			>
				到账记录
			</view>
		</view>

		<!-- tabs展示主体区域 -->
		<view class="tabsContainer">
			<!-- <swiper class="swiper_base" @change="swiperChange" :current="swiperCurrent"> -->
			<!-- 我加入的企业 -->
			<!-- <swiper-item> -->
			<!-- 1.概览 -->
			<view class="tabsItem tabs1" v-if="projectFinnaceCurrent == '1'">
				<view class="overviewRow">
					<view class="rowTitle">
						<view class="line"></view>
						<view class="titleText">项目费用</view>
					</view>
					<view class="rowBody">
						<view class="rowBodyItem">
							<view class="num">{{ finnaceData.arrival + '元' }}</view>
							<view class="title">
								<!-- 合同金额 -->
								到账金额
							</view>
						</view>
						<view class="rowBodyItem rowBodyItem2">
							<view class="num">{{ finnaceData.balance + '元' }}</view>
							<view class="title">剩余金额</view>
						</view>
						<view class="rowBodyItem rowBodyItem3">
							<view class="num">{{ finnaceData.expenditure + '元' }}</view>
							<view class="title">
								全部支出
								<!-- 剩余尾款 -->
							</view>
						</view>
					</view>
				</view>
				<view class="overviewRow" style="margin-top: 20rpx;">
					<view class="rowTitle">
						<view class="line"></view>
						<view class="titleText">其他费用</view>
					</view>
					<view class="rowBody">
						<view class="rowBodyItem rowBodyItem4">
							<view class="num">{{ finnaceData.reimbursement + '元' }}</view>
							<view class="title">报销</view>
						</view>
						<view class="rowBodyItem rowBodyItem5">
							<view class="num">{{ finnaceData.settlement + '元' }}</view>
							<view class="title">项目结算</view>
						</view>
						<view class="rowBodyItem rowBodyItem6">
							<view class="num">{{ finnaceData.expert + '元' }}</view>
							<view class="title">项目专家费</view>
						</view>
					</view>
				</view>
			</view>
			<!-- </swiper-item> -->
			<!-- 2.报销 -->
			<!-- <swiper-item> -->
			<view class="search_bar" v-if="projectFinnaceCurrent == '2'">
				<view class="search_left" @click="select()">
					<image
						src="../../../../static/client/shaixuan.png"
						class="search_left_img"
					></image>
				</view>
				<input
					class="search_bar_input"
					v-model="searchInfo"
					placeholder="输入客户名称或联系人名称"
					placeholder-class="search_input_text"
				/>
				<image
					src="../../../../static/client/sousuo.png"
					class="sousuo_img"
					@click="handleSearch"
				></image>
				<view class="select_query" v-if="select_query">
					<!-- 日期选择器 -->
					<text class="select_query_text">创建时间</text>
					<picker
						mode="date"
						@change="bindStartDateChange"
						style="width:250rpx ;height: 60rpx;"
					>
						<view class="picker_input">{{ date_start }}</view>
					</picker>
					<view
						style="width: 15rpx;height: 3rpx; margin-left: 438rpx;margin-top: -30rpx; background: #999999;"
					></view>
					<picker
						mode="date"
						@change="bindEndDateChange"
						style="width:250rpx ;height: 60rpx;"
					>
						<view class="picker_input" style="margin-left: 470rpx;margin-top: -32rpx;">
							{{ date_end }}
						</view>
					</picker>
					<!-- 流程状态 -->

					<!-- <view class="select_query_text" style="margin-top: 62rpx;">流程状态</view>
					<view class="select_input" style="margin-top: -50rpx;" @click="handleProItemsShow()">
						<text class="select_input_text">{{project_name}}</text>
						<image src="../../../static/client/xiala.png"
							style="width: 20rpx;height: 11rpx;position: absolute; right: 30rpx; top: 30rpx;">
						</image>
					</view> -->

					<!-- 流程状态结束 -->
					<!-- 模糊查询 -->
					<view class="select_query_text" style="margin-top: 62rpx;">模糊查询</view>
					<input
						type="text"
						v-model="searchInfo"
						class="select_input"
						name="input"
						style="margin-top: -50rpx;"
						placeholder="请输入"
						placeholder-style="font-size: 26rpx;font-family: PingFang SC;font-weight: 500;color: #999999;"
					/>
					<!-- 模糊查询结束 -->
					<!-- 取消确定按钮 -->
					<view style="margin-top: 65rpx;">
						<button class="query_button_cancel" @click="handelCancel" style="">
							取消
						</button>
						<button
							class="query_button_confirm"
							@click="handleSearchSlideClick"
							style=""
						>
							确定
						</button>
					</view>
					<!-- 项目类型下拉列表 -->
					<view class="project_item" v-if="proItemShow">
						<view
							class="item_info"
							:class="
								search_project_type == item.project_type_id
									? 'selectSlideItemActive'
									: ''
							"
							v-for="(item, index) in projectTypeList"
							:key="item.project_type_id"
							@tap="tapProItem(item)"
						>
							<text style="margin-left: 21rpx;">{{ item.project_type_name }}</text>
						</view>
					</view>
				</view>
			</view>
			<!-- 筛选查询框 -->
			<scroll-view
				scroll-y
				class="tabsItem tabs1"
				style="height: calc(100vh  - 220rpx);"
				v-if="projectFinnaceCurrent == '2'"
			>
				<!-- 筛选查询框结束 -->
				<view class="finnaceList">
					<uni-swipe-action>
						<uni-swipe-action-item
							v-for="item in tableData1"
							:key="item"
							:right-options="options"
							@click="bindClick1(item.id)"
						>
							<view class="listItem" @click="checkItem1(item)">
								<view class="itemTitle">{{ item.title }}</view>
								<view class="itemInfo">
									<view class="type" v-if="item.type == '1'">
										{{ '类型：' + '项目实施相关费用' }}
									</view>
									<view class="type" v-else-if="item.type == '2'">
										{{ '类型：' + '业务相关费用' }}
									</view>
									<view class="type" v-else-if="item.type == '3'">
										{{ '类型：' + '招待费' }}
									</view>
									<view class="type" v-else-if="item.type == '4'">
										{{ '类型：' + '其他' }}
									</view>
									<view class="type" v-else>{{ '类型：' + '--' }}</view>
									<view class="num">
										<text>{{ '金额：' }}</text>
										<text style="color: #FF3333;">{{ item.total + '元' }}</text>
									</view>
									<view
										class="rightStatus"
										v-if="item.show_state_people != ''"
										style="font-size: 24rpx; color: #999;"
									>
										当前处理人：
										<text
											style="font-size: 28rpx;color: #128BF1;"
											class="overFlowName"
										>
											{{ item.show_state_people }}
										</text>
									</view>
									<view
										class="rightStatus"
										v-else
										style="font-size: 24rpx; color: #999;"
									>
										{{ item.show_state }}
									</view>
								</view>
							</view>
						</uni-swipe-action-item>
					</uni-swipe-action>
					<!-- 加载更多 -->
					<view style="width: 100%;">
						<uni-load-more
							:status="status1"
							iconType="auto"
							@clickLoadMore="getMoreFinnace1"
						></uni-load-more>
					</view>
					<view class="add_client">
						<image
							src="../../../../static/client/tianjia.png"
							style="width: 137rpx;height: 137rpx;"
							@click="handleGoAdd('1')"
						></image>
					</view>
				</view>
			</scroll-view>
			<!-- </swiper-item> -->

			<!-- 3.项目结算 -->
			<!-- <swiper-item> -->
			<view class="search_bar" v-if="projectFinnaceCurrent == '3'">
				<view class="search_left" @click="select()">
					<image
						src="../../../../static/client/shaixuan.png"
						class="search_left_img"
					></image>
				</view>
				<input
					@focus="handleFoces"
					class="search_bar_input"
					v-model="searchInfo"
					placeholder="输入客户名称或联系人名称"
					placeholder-class="search_input_text"
				/>
				<image
					src="../../../../static/client/sousuo.png"
					class="sousuo_img"
					@click="handleSearch"
				></image>
				<view class="select_query" v-if="select_query">
					<!-- 日期选择器 -->
					<text class="select_query_text">创建时间</text>
					<picker
						mode="date"
						@change="bindStartDateChange"
						style="width:250rpx ;height: 60rpx;"
					>
						<view class="picker_input">{{ date_start }}</view>
					</picker>
					<view
						style="width: 15rpx;height: 3rpx; margin-left: 438rpx;margin-top: -30rpx; background: #999999;"
					></view>
					<picker
						mode="date"
						@change="bindEndDateChange"
						style="width:250rpx ;height: 60rpx;"
					>
						<view class="picker_input" style="margin-left: 470rpx;margin-top: -32rpx;">
							{{ date_end }}
						</view>
					</picker>
					<!-- 流程状态 -->

					<!-- <view class="select_query_text" style="margin-top: 62rpx;">流程状态</view>
					<view class="select_input" style="margin-top: -50rpx;" @click="handleProItemsShow()">
						<text class="select_input_text">{{project_name}}</text>
						<image src="../../../static/client/xiala.png"
							style="width: 20rpx;height: 11rpx;position: absolute; right: 30rpx; top: 30rpx;">
						</image>
					</view> -->

					<!-- 流程状态结束 -->
					<!-- 模糊查询 -->
					<view class="select_query_text" style="margin-top: 62rpx;">模糊查询</view>
					<input
						type="text"
						v-model="searchInfo"
						class="select_input"
						name="input"
						style="margin-top: -50rpx;"
						placeholder="请输入"
						placeholder-style="font-size: 26rpx;font-family: PingFang SC;font-weight: 500;color: #999999;"
					/>
					<!-- 模糊查询结束 -->
					<!-- 取消确定按钮 -->
					<view style="margin-top: 65rpx;">
						<button class="query_button_cancel" @click="handelCancel" style="">
							取消
						</button>
						<button
							class="query_button_confirm"
							@click="handleSearchSlideClick"
							style=""
						>
							确定
						</button>
					</view>
					<!-- 项目类型下拉列表 -->
					<view class="project_item" v-if="proItemShow">
						<view
							class="item_info"
							:class="
								search_project_type == item.project_type_id
									? 'selectSlideItemActive'
									: ''
							"
							v-for="(item, index) in projectTypeList"
							:key="item.project_type_id"
							@tap="tapProItem(item)"
						>
							<text style="margin-left: 21rpx;">{{ item.project_type_name }}</text>
						</view>
					</view>
				</view>
			</view>
			<!-- 筛选查询框 -->

			<scroll-view
				scroll-y
				class="tabsItem tabs1"
				style="height: calc(100vh  - 220rpx);"
				v-if="projectFinnaceCurrent == '3'"
			>
				<!-- 筛选查询框结束 -->
				<view class="finnaceList">
					<uni-swipe-action>
						<uni-swipe-action-item
							v-for="item in tableData2"
							:key="item"
							:right-options="options"
							@click="bindClick2(item)"
						>
							<view class="listItem" @click="checkItem2(item)">
								<view class="itemTitle">
									<text
										v-for="items in item.project_list"
										:key="items.project_id"
										style="margin-right:10rpx"
									>
										{{ items.project_name }}
									</text>
								</view>
								<view class="itemInfo">
									<view class="type">
										{{ '申请人：' + item.member.nickname }}
									</view>
									<view class="num">
										<text>{{ '金额：' }}</text>
										<text style="color: #FF3333;">{{ item.total + '元' }}</text>
									</view>
									<view
										class="rightStatus"
										v-if="item.show_state_people!=''"
										style="font-size: 24rpx; color: #999;"
									>
										当前处理人：
										<text
											style="font-size: 28rpx;color: #128BF1;"
											class="overFlowName"
										>
											{{ item.show_state_people }}
										</text>
									</view>
									<view
										class="rightStatus"
										v-else
										style="font-size: 24rpx; color: #999;"
									>
										{{ item.show_state }}
									</view>
								</view>
							</view>
						</uni-swipe-action-item>
					</uni-swipe-action>
					<!-- 加载更多 -->
					<view style="width: 100%;">
						<uni-load-more
							:status="status2"
							iconType="auto"
							@clickLoadMore="getMoreFinnace2"
						></uni-load-more>
					</view>
					<view class="add_client">
						<image
							src="../../../../static/client/tianjia.png"
							style="width: 137rpx;height: 137rpx;"
							@click="handleGoAdd('2')"
						></image>
					</view>
				</view>
			</scroll-view>
			<!-- </swiper-item> -->
			<!-- 4.项目专家申请费 -->
			<!-- <swiper-item> -->
			<view class="search_bar" v-if="projectFinnaceCurrent == '4'">
				<view class="search_left" @click="select()">
					<image
						src="../../../../static/client/shaixuan.png"
						class="search_left_img"
					></image>
				</view>
				<input
					@focus="handleFoces"
					class="search_bar_input"
					v-model="searchInfo"
					placeholder="输入客户名称或联系人名称"
					placeholder-class="search_input_text"
				/>
				<image
					src="../../../../static/client/sousuo.png"
					class="sousuo_img"
					@click="handleSearch"
				></image>
				<view class="select_query" v-if="select_query">
					<!-- 日期选择器 -->
					<text class="select_query_text">创建时间</text>
					<picker
						mode="date"
						@change="bindStartDateChange"
						style="width:250rpx ;height: 60rpx;"
					>
						<view class="picker_input">{{ date_start }}</view>
					</picker>
					<view
						style="width: 15rpx;height: 3rpx; margin-left: 438rpx;margin-top: -30rpx; background: #999999;"
					></view>
					<picker
						mode="date"
						@change="bindEndDateChange"
						style="width:250rpx ;height: 60rpx;"
					>
						<view class="picker_input" style="margin-left: 470rpx;margin-top: -32rpx;">
							{{ date_end }}
						</view>
					</picker>
					<!-- 流程状态 -->

					<!-- <view class="select_query_text" style="margin-top: 62rpx;">流程状态</view>
					<view class="select_input" style="margin-top: -50rpx;" @click="handleProItemsShow()">
						<text class="select_input_text">{{project_name}}</text>
						<image src="../../../static/client/xiala.png"
							style="width: 20rpx;height: 11rpx;position: absolute; right: 30rpx; top: 30rpx;">
						</image>
					</view> -->

					<!-- 流程状态结束 -->
					<!-- 模糊查询 -->
					<view class="select_query_text" style="margin-top: 62rpx;">模糊查询</view>
					<input
						type="text"
						v-model="searchInfo"
						class="select_input"
						name="input"
						style="margin-top: -50rpx;"
						placeholder="请输入"
						placeholder-style="font-size: 26rpx;font-family: PingFang SC;font-weight: 500;color: #999999;"
					/>
					<!-- 模糊查询结束 -->
					<!-- 取消确定按钮 -->
					<view style="margin-top: 65rpx;">
						<button class="query_button_cancel" @click="handelCancel" style="">
							取消
						</button>
						<button
							class="query_button_confirm"
							@click="handleSearchSlideClick"
							style=""
						>
							确定
						</button>
					</view>
					<!-- 项目类型下拉列表 -->
					<view class="project_item" v-if="proItemShow">
						<view
							class="item_info"
							:class="
								search_project_type == item.project_type_id
									? 'selectSlideItemActive'
									: ''
							"
							v-for="(item, index) in projectTypeList"
							:key="item.project_type_id"
							@tap="tapProItem(item)"
						>
							<text style="margin-left: 21rpx;">{{ item.project_type_name }}</text>
						</view>
					</view>
				</view>
			</view>
			<!-- 筛选查询框 -->

			<scroll-view
				scroll-y
				class="tabsItem tabs1"
				style="height: calc(100vh  - 220rpx);"
				v-if="projectFinnaceCurrent == '4'"
			>
				<!-- 筛选查询框结束 -->
				<view class="finnaceList">
					<uni-swipe-action>
						<uni-swipe-action-item
							v-for="item in tableData3"
							:key="item"
							:right-options="options"
							@click="bindClick3(item)"
						>
							<view class="listItem" @click="checkItem3(item)">
								<view class="itemTitle">
									<text
										v-for="items in item.project_list"
										:key="items.project_id"
										style="margin-right:10rpx"
									>
										{{ items.project_name }}
									</text>
								</view>
								<view class="itemInfo">
									<view class="type">
										{{ '申请人：' + item.member.nickname }}
									</view>
									<view class="num">
										<text>{{ '金额：' }}</text>
										<text style="color: #FF3333;">{{ item.total + '元' }}</text>
									</view>
									<view
										class="rightStatus"
										v-if="item.show_state_people!=''"
										style="font-size: 24rpx; color: #999;"
									>
										当前处理人：
										<text
											style="font-size: 28rpx;color: #128BF1;"
											class="overFlowName"
										>
											{{ item.show_state_people }}
										</text>
									</view>
									<view
										class="rightStatus"
										v-else
										style="font-size: 24rpx; color: #999;"
									>
										{{ item.show_state }}
									</view>
								</view>
							</view>
						</uni-swipe-action-item>
					</uni-swipe-action>
					<!-- 加载更多 -->
					<view style="width: 100%;">
						<uni-load-more
							:status="status3"
							iconType="auto"
							@clickLoadMore="getMoreFinnace3"
						></uni-load-more>
					</view>
					<view class="add_client">
						<image
							src="../../../../static/client/tianjia.png"
							style="width: 137rpx;height: 137rpx;"
							@click="handleGoAdd('3')"
						></image>
					</view>
				</view>
			</scroll-view>
			<!-- </swiper-item> -->
			<!-- 5.到账记录 -->
			<!-- <swiper-item> -->
			<view class="search_bar" v-if="projectFinnaceCurrent == '5'">
				<view class="search_left" @click="select()">
					<image
						src="../../../../static/client/shaixuan.png"
						class="search_left_img"
					></image>
				</view>
				<input
					@focus="handleFoces"
					class="search_bar_input"
					v-model="searchInfo"
					placeholder="输入客户名称或联系人名称"
					placeholder-class="search_input_text"
				/>
				<image
					src="../../../../static/client/sousuo.png"
					class="sousuo_img"
					@click="handleSearch"
				></image>
				<view class="select_query" v-if="select_query">
					<!-- 日期选择器 -->
					<text class="select_query_text">创建时间</text>
					<picker
						mode="date"
						@change="bindStartDateChange"
						style="width:250rpx ;height: 60rpx;"
					>
						<view class="picker_input">{{ date_start }}</view>
					</picker>
					<view
						style="width: 15rpx;height: 3rpx; margin-left: 438rpx;margin-top: -30rpx; background: #999999;"
					></view>
					<picker
						mode="date"
						@change="bindEndDateChange"
						style="width:250rpx ;height: 60rpx;"
					>
						<view class="picker_input" style="margin-left: 470rpx;margin-top: -32rpx;">
							{{ date_end }}
						</view>
					</picker>
					<!-- 流程状态 -->

					<!-- <view class="select_query_text" style="margin-top: 62rpx;">流程状态</view>
					<view class="select_input" style="margin-top: -50rpx;" @click="handleProItemsShow()">
						<text class="select_input_text">{{project_name}}</text>
						<image src="../../../static/client/xiala.png"
							style="width: 20rpx;height: 11rpx;position: absolute; right: 30rpx; top: 30rpx;">
						</image>
					</view> -->

					<!-- 流程状态结束 -->
					<!-- 模糊查询 -->
					<view class="select_query_text" style="margin-top: 62rpx;">模糊查询</view>
					<input
						type="text"
						v-model="searchInfo"
						class="select_input"
						name="input"
						style="margin-top: -50rpx;"
						placeholder="请输入"
						placeholder-style="font-size: 26rpx;font-family: PingFang SC;font-weight: 500;color: #999999;"
					/>
					<!-- 模糊查询结束 -->
					<!-- 取消确定按钮 -->
					<view style="margin-top: 65rpx;">
						<button class="query_button_cancel" @click="handelCancel" style="">
							取消
						</button>
						<button
							class="query_button_confirm"
							@click="handleSearchSlideClick"
							style=""
						>
							确定
						</button>
					</view>
					<!-- 项目类型下拉列表 -->
					<view class="project_item" v-if="proItemShow">
						<view
							class="item_info"
							:class="
								search_project_type == item.project_type_id
									? 'selectSlideItemActive'
									: ''
							"
							v-for="(item, index) in projectTypeList"
							:key="item.project_type_id"
							@tap="tapProItem(item)"
						>
							<text style="margin-left: 21rpx;">{{ item.project_type_name }}</text>
						</view>
					</view>
				</view>
			</view>
			<!-- 筛选查询框 -->

			<scroll-view
				scroll-y
				class="tabsItem tabs1"
				style="height: calc(100vh  - 220rpx);"
				v-if="projectFinnaceCurrent == '5'"
			>
				<!-- 筛选查询框结束 -->
				<view class="finnaceList">
					<uni-swipe-action>
						<uni-swipe-action-item
							v-for="item in tableData4"
							:key="item"
							:right-options="options"
							@click="bindClick4(item)"
						>
							<view class="listItem" @click="checkItem4(item)">
								<view class="itemTitle">
									<text
										v-for="items in item.project_list"
										:key="items.project_id"
										style="margin-right:10rpx"
									>
										{{ items.project_name }}
									</text>
								</view>
								<view class="itemInfo">
									<view class="type">
										{{ '申请人：' + item.member.nickname }}
									</view>
									<view class="num">
										<text>{{ '金额：' }}</text>
										<text style="color: #FF3333;">{{ item.total + '元' }}</text>
									</view>
									<view
										class="rightStatus"
										v-if="item.show_state_people!=''"
										style="font-size: 24rpx; color: #999;"
									>
										当前处理人：
										<text
											style="font-size: 28rpx;color: #128BF1;"
											class="overFlowName"
										>
											{{ item.show_state_people }}
										</text>
									</view>
									<view
										class="rightStatus"
										v-else
										style="font-size: 24rpx; color: #999;"
									>
										{{ item.show_state }}
									</view>
								</view>
							</view>
						</uni-swipe-action-item>
					</uni-swipe-action>
					<!-- 加载更多 -->
					<view style="width: 100%;">
						<uni-load-more
							:status="status4"
							iconType="auto"
							@clickLoadMore="getMoreFinnace4"
						></uni-load-more>
					</view>
					<view class="add_client">
						<image
							src="../../../../static/client/tianjia.png"
							style="width: 137rpx;height: 137rpx;"
							@click="handleGoAdd('4')"
						></image>
					</view>
				</view>
			</scroll-view>
			<!-- </swiper-item> -->
			<!-- </swiper> -->
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			tableData1: [],
			tableData2: [],
			tableData3: [],
			tableData4: [],
			pageNum1: 0,
			pageNum2: 0,
			pageNum3: 0,
			pageNum4: 0,
			totle1: 0,
			totle2: 0,
			totle3: 0,
			totle4: 0,
			searchInfo: '',
			date_start: '',
			date_end: '',
			financeIndexData: {},
			startDate: '',
			endDate: '',
			select_query: false,
			status1: 'more',
			status2: 'more',
			status3: 'more',
			status4: 'more',
			pageNum: 0,
			token: '',
			member_id: '',
			company_id: '',
			projectFinnaceCurrent: '1',
			projectTypeList: [
				{
					project_type_id: '1',
					project_type_name: '1'
				}
			],
			proItemShow: false,
			swiperCurrent: 0,
			options: [
				{
					text: '删除',
					style: {
						backgroundColor: '#dd524d'
					}
				}
			],
			project_id: '',
			project_name: '',
			finnaceData: {}
		};
	},
	onShow() {
		this.getFinnaceLook();
		this.getReimbursementList();
		this.getSettlementList();
		this.getExpertList();
		this.getArrivalList();
	},
	onLoad(options) {
		this.token = uni.getStorageSync('btlh_process_token') || '';
		this.member_id = uni.getStorageSync('btlh_process_member_id') || '';
		this.company_id = uni.getStorageSync('bthl_process_LoginCompanyId') || '';
		this.project_id = options.project_id || '';
		this.project_name = options.project_name || '';
		if (this.project_id) {
			// this.getFinnaceLook()
		}
		// if (options.type) {
		// 	if(options.type=='2'){
		// 		console.log(12312312312312123)
		// 		this.projectFinnaceCurrent = '2'
		// 		this.getReimbursementList()
		// 	}
		// }
	},
	// 开启微信发送给朋友
	//#ifdef MP-WEIXIN
	onShareAppMessage() {
		return{
			path:'/packageProject/pages/project/projectFinnace/projectFinnaceIndex?project_id='+this.project_id
		}
	},
	//#endif
	methods: {
		// 4到账记录
		async getArrivalList() {
			const { data: res } = await this.$myRequest({
				url: 'Project/arrival',
				method: 'POST',
				data: {
					member_id: this.member_id,
					token: this.token,
					company_id: this.company_id,
					project_id: this.project_id,

					p: 1,
					p_count: 10 + this.pageNum4 * 5
				}
			});
			if (res.code != 200)
				return uni.showToast({
					title: res.datas.msg,
					icon: 'none'
				});
			this.tableData4 = res.datas.listInfo;
			this.totle4 = parseInt(res.datas.count);
			console.log('到账记录列表', this.tableData4);
		},
		// 3获取项目专家费
		async getExpertList() {
			const { data: res } = await this.$myRequest({
				url: 'Project/expert',
				method: 'POST',
				data: {
					member_id: this.member_id,
					token: this.token,
					company_id: this.company_id,
					project_id: this.project_id,

					p: 1,
					p_count: 10 + this.pageNum3 * 5
				}
			});
			if (res.code != 200)
				return uni.showToast({
					title: res.datas.msg,
					icon: 'none'
				});
			this.tableData3 = res.datas.listInfo;
			this.totle3 = parseInt(res.datas.count);
			console.log('项目专家费列表', this.tableData3);
		},
		// 2获取项目结算列表
		async getSettlementList() {
			const { data: res } = await this.$myRequest({
				url: 'Project/settlement',
				method: 'POST',
				data: {
					member_id: this.member_id,
					token: this.token,
					company_id: this.company_id,
					project_id: this.project_id,

					p: 1,
					p_count: 10 + this.pageNum2 * 5
				}
			});
			if (res.code != 200)
				return uni.showToast({
					title: res.datas.msg,
					icon: 'none'
				});
			this.tableData2 = res.datas.listInfo;
			this.totle2 = parseInt(res.datas.count);
			console.log('项目结算列表', this.tableData2);
		},
		// 1获取报销列表
		async getReimbursementList() {
			const { data: res } = await this.$myRequest({
				url: 'Project/reimbursement',
				method: 'POST',
				data: {
					member_id: this.member_id,
					token: this.token,
					company_id: this.company_id,
					project_id: this.project_id,

					p: 1,
					p_count: 10 + this.pageNum1 * 5
				}
			});
			if (res.code != 200)
				return uni.showToast({
					title: res.datas.msg,
					icon: 'none'
				});
			this.tableData1 = res.datas.listInfo;
			this.totle1 = parseInt(res.datas.count);
			console.log('报销列表', this.tableData1);
		},
		// 1查看报销详情
		checkItem1(item) {
			if (item.id) {
				uni.navigateTo({
					url: `/packageProject/pages/project/projectFinnace/projectFinnaceDispatch?finnaceId=${
						item.id
					}&project_id=${this.project_id}&project_name=${this.project_name}`
				});
			}
		},
		// 2查看项目结算
		checkItem2(item) {
			if (item.id) {
				uni.navigateTo({
					url: `/packageProject/pages/project/projectFinnace/projectFinnaceAccount?finnaceId=${
						item.id
					}&project_id=${this.project_id}&project_name=${this.project_name}`
				});
			}
		},
		// 3查看专家费
		checkItem3(item) {
			if (item.id) {
				uni.navigateTo({
					url: `/packageProject/pages/project/projectFinnace/projectFinnaceExpert?finnaceId=${
						item.id
					}&project_id=${this.project_id}&project_name=${this.project_name}`
				});
			}
		},
		// 查看到账
		checkItem4(item) {
			if (item.id) {
				uni.navigateTo({
					url: `/packageProject/pages/project/projectFinnace/projectFinnaceSend?finnaceId=${
						item.id
					}&project_id=${this.project_id}&project_name=${this.project_name}`
				});
			}
		},
		// 获取总览
		async getFinnaceLook() {
			const {
				data: res
			} = await this.$myRequest({
				url: 'Project/finance',
				method: 'POST',
				data: {
					member_id: this.member_id,
					token: this.token,
					company_id: this.company_id,
					project_id: this.project_id,
				},
			})
			if (res.code != 200) return uni.showToast({
				title: res.datas.msg,
				icon: 'none'
			})
			this.finnaceData = res.datas.list
			console.log('财务总览', this.finnaceData)
		},
		// 搜索按钮点击
		handleSearch() {
			console.log(this.swiperCurrent);
			switch (this.swiperCurrent) {
				case 0:
					this.getFinnaceLook();
					break;
				case 1:
					this.getReimbursementList();
					break;
				case 2:
					this.getSettlementList();
					break;
				case 3:
					this.getExpertList();
					break;
				case 4:
					this.getArrivalList();
					break;
			}
		},
		handleSearchSlideClick() {
			switch (this.swiperCurrent) {
				case 0:
					this.getFinnaceLook();
					break;
				case 1:
					this.getReimbursementList();
					break;
				case 2:
					this.getSettlementList();
					break;
				case 3:
					this.getExpertList();
					break;
				case 4:
					this.getArrivalList();
					break;
			}
			this.select_query = false;
			this.searchInfo = '';
			this.date_start = '';
			this.date_end = '';
		},
		// 1删除报销
		bindClick1(id, e) {
			console.log(id);
			uni.showModal({
				title: '提示',
				content: '确定删除此条报销吗？',
				success: async res => {
					if (res.confirm) {
						// 删除
						const { data: res } = await this.$myRequest({
							url: 'Finance/reimbursement_del',
							method: 'POST',
							data: {
								member_id: this.member_id,
								token: this.token,
								company_id: this.company_id,

								finance_id: id
							}
						});
						if (res.code != 200)
							return uni.showToast({
								title: res.datas.msg,
								icon: 'none'
							});
						uni.showToast({
							title: res.datas.msg,
							icon: 'none'
						});
						this.getReimbursementList();
					} else if (res.cancel) {
						console.log('用户点击取消');
					}
				}
			});
		},
		// 2删除项目结算
		bindClick2(id, e) {
			uni.showModal({
				title: '提示',
				content: '确定删除此条报销吗？',
				success: async res => {
					if (res.confirm) {
						// 删除
						const { data: res } = await this.$myRequest({
							url: 'Finance/settlement_del',
							method: 'POST',
							data: {
								member_id: this.member_id,
								token: this.token,
								company_id: this.company_id,

								finance_id: id
							}
						});
						if (res.code != 200)
							return uni.showToast({
								title: res.datas.msg,
								icon: 'none'
							});
						uni.showToast({
							title: res.datas.msg,
							icon: 'none'
						});
						this.getReimbursementList();
					} else if (res.cancel) {
						console.log('用户点击取消');
					}
				}
			});
		},
		// 3删除专家费申请
		bindClick3(id, e) {
			uni.showModal({
				title: '提示',
				content: '确定删除此条报销吗？',
				success: async res => {
					if (res.confirm) {
						// 删除
						const { data: res } = await this.$myRequest({
							url: 'Finance/expert_del',
							method: 'POST',
							data: {
								member_id: this.member_id,
								token: this.token,
								company_id: this.company_id,

								finance_id: id
							}
						});
						if (res.code != 200)
							return uni.showToast({
								title: res.datas.msg,
								icon: 'none'
							});
						uni.showToast({
							title: res.datas.msg,
							icon: 'none'
						});
						this.getReimbursementList();
					} else if (res.cancel) {
						console.log('用户点击取消');
					}
				}
			});
		},
		// 4删除到账记录
		bindClick3(id, e) {
			uni.showModal({
				title: '提示',
				content: '确定删除此条报销吗？',
				success: async res => {
					if (res.confirm) {
						// 删除
						const { data: res } = await this.$myRequest({
							url: 'Finance/arrival_del',
							method: 'POST',
							data: {
								member_id: this.member_id,
								token: this.token,
								company_id: this.company_id,

								finance_id: id
							}
						});
						if (res.code != 200)
							return uni.showToast({
								title: res.datas.msg,
								icon: 'none'
							});
						uni.showToast({
							title: res.datas.msg,
							icon: 'none'
						});
						this.getReimbursementList();
					} else if (res.cancel) {
						console.log('用户点击取消');
					}
				}
			});
		},
		// 点击加载更多1
		getMoreFinnace1() {
			if (this.totle1 > this.tableData1.length) {
				this.status1 = 'loading';
				this.pageNum1++;
				this.getReimbursementList(); //执行的方法
				this.status1 = 'more';
			} else {
				//停止加载
				this.status1 = 'noMore';
			}
		},
		// 点击加载更多2
		getMoreFinnace2() {
			if (this.totle2 > this.tableData2.length) {
				this.status2 = 'loading';
				this.pageNum2++;
				this.getSettlementList(); //执行的方法
				this.status2 = 'more';
			} else {
				//停止加载
				this.status2 = 'noMore';
			}
		},
		// 点击加载更多3
		getMoreFinnace3() {
			if (this.totle3 > this.tableData3.length) {
				this.status3 = 'loading';
				this.pageNum3++;
				this.getExpertList(); //执行的方法
				this.status3 = 'more';
			} else {
				//停止加载
				this.status3 = 'noMore';
			}
		},
		// 点击加载更多4
		getMoreFinnace4() {
			if (this.totle4 > this.tableData4.length) {
				this.status4 = 'loading';
				this.pageNum4++;
				this.getArrivalList(); //执行的方法
				this.status4 = 'more';
			} else {
				//停止加载
				this.status4 = 'noMore';
			}
		},
		swiperChange(e) {
			this.swiperCurrent = e.detail.current;
			switch (this.swiperCurrent) {
				case 0:
					this.projectFinnaceCurrent = '1';
					break;
				case 1:
					this.projectFinnaceCurrent = '2';
					break;
				case 2:
					this.projectFinnaceCurrent = '3';
					break;
				case 3:
					this.projectFinnaceCurrent = '4';
					break;
				case 4:
					this.projectFinnaceCurrent = '5';
					break;
			}
		},
		handleTabsBarClick(val) {
			this.projectFinnaceCurrent = val;
			switch (val) {
				case '1':
					this.swiperCurrent = 0;
					this.getFinnaceLook();
					break;
				case '2':
					this.swiperCurrent = 1;
					this.getReimbursementList();
					break;
				case '3':
					this.swiperCurrent = 2;
					this.getSettlementList();
					break;
				case '4':
					this.swiperCurrent = 3;
					this.getExpertList();
					break;
				case '5':
					this.swiperCurrent = 4;
					this.getArrivalList();
					break;
			}
			console.log(this.swiperCurrent);
		},
		handleGoAdd(val) {
			switch (val) {
				case '1':
					uni.navigateTo({
						url: `/packageProject/pages/project/projectFinnace/projectFinnaceDispatch?project_id=${
							this.project_id
						}&project_name=${this.project_name}`
					});
					break;
				case '2':
					uni.navigateTo({
						url: `/packageProject/pages/project/projectFinnace/projectFinnaceAccount?project_id=${
							this.project_id
						}&project_name=${this.project_name}`
					});
					break;
				case '3':
					uni.navigateTo({
						url: `/packageProject/pages/project/projectFinnace/projectFinnaceExpert?project_id=${
							this.project_id
						}&project_name=${this.project_name}`
					});
					break;
				case '4':
					uni.navigateTo({
						url: `/packageProject/pages/project/projectFinnace/projectFinnaceSend?project_id=${
							this.project_id
						}&project_name=${this.project_name}`
					});
					break;
			}
		},
		bindStartDateChange(e) {
			this.date_start = e.target.value;
		},
		bindEndDateChange(e) {
			this.date_end = e.target.value;
		},
		handleProItemsShow() {
			this.proItemShow = !this.proItemShow;
		},
		// 点击选择项目类型
		tapProItem(item) {
			console.log(item);
			this.project_name = item.project_type_name;
			this.search_project_type = item.project_type_id;
			this.proItemShow = false;
		},
		handelCancel() {
			this.searchInfo = '';
			this.date_start = '';
			this.date_end = '';
			this.select_query = false;
		},
		// 点击筛选查询按钮显示查询框
		select() {
			this.select_query = !this.select_query;
		},
		// 点击左上返回按钮
		back() {
			uni.navigateBack({
				delta: 1
			});
		}
	}
};
</script>

<style scoped lang="scss">
.head_text {
	width: 100%;
	height: 128rpx;
	font-size: 36rpx;
	font-family: PingFang SC;
	font-weight: bold;
	color: #333333;
	line-height: 160rpx;
	text-align: center;
	border-bottom: 2rpx solid #f7f7f7;
}

// 导航栏头部点击部分
.tabsBarHeader {
	display: flex;
	background-color: #fff;

	.barHeaderItem {
		display: flex;
		justify-content: center;
		align-items: center;
		height: 88rpx;
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #666666;
		box-sizing: border-box;
		text-align: center;
		position: relative;
	}

	.tabsCurrentHeader {
		color: #128bf1;
	}

	.tabsCurrentHeader::before {
		content: '';
		height: 4rpx;
		width: 88%;
		background-color: #40a0f2;
		border-radius: 2rpx;
		position: absolute;
		bottom: 0;
		left: 10rpx;
	}
}

// tabs主体区域
.tabsContainer {
	.tabsItem {
		background-color: #f7f7f7;
		position: relative;

		.finnaceList {
			// height: auto;
			.listItem {
				background-color: #fff;

				.itemTitle {
					width: 100%;
					overflow: hidden;
					white-space: nowrap;
					text-overflow: ellipsis;
					min-height: 20rpx;
					font-size: 28rpx;
					font-family: PingFang SC;
					font-weight: 500;
					color: #333333;
					padding-top: 35rpx;
					margin-left: 30rpx;
				}

				.itemInfo {
					display: flex;
					justify-content: space-between;
					align-items: center;
					padding-bottom: 30rpx;
					margin-bottom: 5rpx;

					.type {
						width: 220rpx;
						overflow: hidden;
						white-space: nowrap;
						text-overflow: ellipsis;
						font-size: 24rpx;
						font-family: PingFang SC;
						font-weight: 500;
						color: #999999;
						margin-left: 30rpx;
					}

					.num {
						width: 200rpx;
						font-size: 24rpx;
						overflow: hidden;
						white-space: nowrap;
						text-overflow: ellipsis;
						font-family: PingFang SC;
						font-weight: 500;
						color: #666666;
					}

					.rightStatus {
						width: 250rpx;
						margin-right: 30rpx;
						text-align: right;
					}
				}
			}
		}
	}

	// 2.报销
	.tabs2 {
	}

	// 1.概览
	.tabs1 {
		margin-top: 20rpx;

		.overviewRow {
			background-color: #fff;

			.rowTitle {
				height: 102rpx;
				display: flex;
				align-items: center;
				border-bottom: 1px solid #efefef;

				.line {
					width: 6rpx;
					height: 42rpx;
					margin-left: 30rpx;
					margin-right: 23rpx;
					background: #40a0f2;
				}

				.titleText {
					font-size: 32rpx;
					font-family: PingFang SC;
					font-weight: bold;
					color: #333333;
				}
			}

			.rowBody {
				box-sizing: border-box;
				padding: 0 45rpx;
				padding-top: 26rpx;
				display: flex;
				flex-wrap: wrap;
				justify-content: space-between;

				.rowBodyItem {
					width: 317rpx;
					height: 147rpx;
					background: url(../../../../static/images/projectfinnal_1.png) no-repeat;
					background-size: 100% 100%;

					.num {
						font-size: 30rpx;
						font-family: PingFang SC;
						font-weight: 500;
						color: #ffffff;
						margin-top: 33rpx;
						margin-left: 48rpx;
					}

					.title {
						font-size: 26rpx;
						font-family: PingFang SC;
						font-weight: 500;
						color: #ffffff;
						margin-left: 76rpx;
					}
				}

				.rowBodyItem2 {
					background: url(../../../../static/images/projectfinnal_2.png) no-repeat;
					background-size: 100% 100%;
				}

				.rowBodyItem3 {
					margin-top: 13rpx;
					background: url(../../../../static/images/projectfinnal_3.png) no-repeat;
					background-size: 100% 100%;
				}

				.rowBodyItem4 {
					background: url(../../../../static/images/projectfinnal_4.png) no-repeat;
					background-size: 100% 100%;
				}

				.rowBodyItem5 {
					background: url(../../../../static/images/projectfinnal_5.png) no-repeat;
					background-size: 100% 100%;
				}

				.rowBodyItem6 {
					margin-top: 13rpx;
					background: url(../../../../static/images/projectfinnal_6.png) no-repeat;
					background-size: 100% 100%;
				}
			}
		}
	}
}

.add_client {
	width: 137rpx;
	height: 137rpx;
	position: fixed;
	right: 25rpx;
	bottom: 120rpx;
	z-index: 5;
}

.swiper_base {
	height: calc(100vh - 108rpx - 128rpx);
	// height: auto;
	// overflow-y: auto;
}

.search_bar {
	background-color: #fff;
	width: 100%;
	height: 92rpx;
	position: relative;
	border-bottom: 20rpx solid #f7f7f7;

	.search_bar_input {
		width: 584rpx;
		height: 72rpx;
		background: #f7f7f7;
		border: 1rpx solid #f7f7f7;
		border-radius: 36px;
		margin-left: 136rpx;
		position: absolute;
		top: 10rpx;
		font-size: 26rpx;
		box-sizing: border-box;
		padding-left: 20rpx;

		.search_input_text {
			font-size: 26rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #b2b2b2;
			line-height: 37px;
			margin-left: 31rpx;
		}
	}

	.search_left_img {
		width: 46rpx;
		height: 36rpx;
		padding: 28rpx 30rpx;
	}

	.search_left {
		width: 106rpx;
		height: 92rpx;
		background: #40a0f2;
	}

	.sousuo_img {
		width: 38rpx;
		height: 34rpx;
		position: absolute;
		top: 28rpx;
		left: 650rpx;
		z-index: 99;
	}
}

.select_query {
	width: 100%;
	height: auto;
	background: #fff;
	position: absolute;
	top: 95rpx;
	z-index: 99;
	padding-top: 56rpx;
	box-shadow: 1px 3px 15px 0px rgba(3, 70, 126, 0.2);

	.select_query_text {
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #333333;
		margin-left: 30rpx;
	}

	.query_button_confirm {
		width: 375rpx;
		height: 80rpx;
		background: linear-gradient(0deg, #40a0f2 0%, #128bf1 100%);
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #ffffff;
		border-radius: 0;
		margin-right: 0;
		margin-top: -80rpx;
	}

	.query_button_cancel {
		width: 385rpx;
		height: 80rpx;
		border-radius: 0px;
		margin-left: 0;
		background: #ffffff;
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #999999;
	}

	.picker_input {
		width: 250rpx;
		height: 60rpx;
		background: #ffffff;
		border: 1px solid #dfdfdf;
		border-radius: 10rpx;
		font-size: 26rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #999999;
		line-height: 60rpx;
		text-align: center;
		margin-left: 170rpx;
		margin-top: -48rpx;
	}

	.select_input {
		width: 530rpx;
		height: 60rpx;
		background: #ffffff;
		border: 1rpx solid #dfdfdf;
		border-radius: 10px;
		margin-left: 170rpx;
		line-height: 60rpx;
		padding-left: 22rpx;
		position: relative;
		font-size: 26rpx;

		.select_input_text {
			font-size: 26rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #666666;
		}
	}
}

.project_item {
	width: 550rpx;
	height: 296rpx;
	background: #ffffff;
	box-shadow: 2rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.2);
	border-radius: 10px;
	position: absolute;
	top: 227rpx;
	right: 25rpx;
	z-index: 999;

	.item_info {
		width: 100%;
		height: 60rpx;
		font-size: 26rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #333333;
		line-height: 60rpx;
	}
}
.rightStatus{
	display: flex;
}
.overFlowName {
	display: block;
	width: 100rpx;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
</style>
